//
//  FXDiscoverController.swift
//  微博(Swift)
//
//  Created by V on 15/12/26.
//  Copyright © 2015年 V. All rights reserved.
//

import UIKit

class FXDiscoverController: FXVisitorTableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        if userLogin == false {
            visitorView.setupInfo("visitordiscover_image_message", text: "有时候你想证明给一万个人看，但最后你发现只有一个人懂，那就够了。")
            return
            
            
        }
        
        let seachView: FXSeachView = FXSeachView.seachView()
        seachView.frame.size.width = SCREENW
        navigationItem.titleView = seachView
        
        tabBarItem.badgeValue = "10"
        print(tabBarItem)
        
        
        // 取出系统控件的子控件
        let taBar = tabBarController!.tabBar
        for taBarChild in taBar.subviews {
            if taBarChild.isKindOfClass(NSClassFromString("UITabBarButton")!) {
                for taBarButtonChild in taBarChild.subviews {
                    if taBarButtonChild.isKindOfClass(NSClassFromString("_UIBadgeView")!) {
                        for badgeViewChild in taBarButtonChild.subviews {
                            if badgeViewChild.isKindOfClass(NSClassFromString("_UIBadgeBackground")!) {
                                print(badgeViewChild)
                            }
                        }
                    }
                }
            }
            
        }
    }
    
    
    

}
